#ifndef _UDEV_REPORT_H_
#define _UDEV_REPORT_H_

#include <libudev.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include "utils.h"
#include "error_code.h"

#define MODEL_LEN 32
#define VENDOR_LEN 32
#define DEVPATH_LEN 32

typedef struct udev_device device_t;
typedef struct tag_device_info device_info_t;

/* Device protocol type flag */
enum tag_protocol_type {
    SCSI_PROTOCOL = 0,
    NVME_PROTOCOL,
    UNSUPPORTED_PROTOCOL,
};

struct tag_device_info {
    dev_t devnum;
    unsigned int action;
    unsigned int protocol;
    char model[MODEL_LEN];
    char devpath[DEVPATH_LEN];
};

int udev_monitor_start(void);
int udev_monitor_stop(void);
int udev_scan_device(void);
int udev_scan_controller(void);

int udev_get_device_info(device_t *device, device_info_t *device_info);;
int udev_report_device(device_info_t *device_info);

#endif
